package frame.options.simulation;

import java.awt.event.KeyEvent;

import javax.swing.JMenu;

import frame.SimulatorFrame;

@SuppressWarnings("serial")
public class SimulationMenu extends JMenu
{	
	private SimulatorFrame simulatorFrame;
	public SimulatorFrame getFrame(){ return simulatorFrame; }
	public void setFrame( SimulatorFrame simulatorFrame ){ this.simulatorFrame = simulatorFrame; }
	
	private CreateSimulationMenuItem createSimulationMenuItem;
	public CreateSimulationMenuItem getCreateSimulationMenuItem(){ return createSimulationMenuItem; }
	public void setCreateSimulationMenuItem( CreateSimulationMenuItem createSimulationMenuItem ){ this.createSimulationMenuItem = createSimulationMenuItem; }

	private RunSimulationMenuItem runSimulationMenuItem;
	public RunSimulationMenuItem getRunSimulationMenuItem(){ return runSimulationMenuItem; }
	public void setRunSimulationMenuItem( RunSimulationMenuItem runSimulationMenuItem ){ this.runSimulationMenuItem = runSimulationMenuItem; }
	
	public SimulationMenu( SimulatorFrame simulatorFrame )
	{
		this.setFrame( simulatorFrame );
		this.setCreateSimulationMenuItem( new CreateSimulationMenuItem( simulatorFrame ) );
		this.setRunSimulationMenuItem( new RunSimulationMenuItem( simulatorFrame ) );
		
		this.setText( "Simulation" );
		this.setMnemonic( KeyEvent.VK_I );
		this.add( this.getCreateSimulationMenuItem() );
		this.add( this.getRunSimulationMenuItem() );
	}
	
}
